<?php

namespace BaseBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * ShoppingCart
 *
 * @ORM\Table(name="shopping_cart", options={"comment":"购物车表"})
 * @ORM\Entity()
 */
class ShoppingCart
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var Goods
     *
     * @ORM\ManyToOne(targetEntity="BaseBundle\Entity\Goods", inversedBy="id")
     * @ORM\JoinColumn(name="goods_id", referencedColumnName="id")
     */
    private $goods;

    /**
     * @var User
     *
     * @ORM\ManyToOne(targetEntity="BaseBundle\Entity\User", inversedBy="id")
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
     */
    private $user;

    /**
     * @var int
     *
     * @ORM\Column(name="pay_num", type="integer", options={"comment"="购买数量", "default"=1})
     */
    private $pay_num;

    /**
     * @var string
     *
     * @ORM\Column(name="material_name", type="string", length=45, nullable=true ,options={"comment"="规格名称"})
     */
    private $material_name;

    /**
     * @var string
     *
     * @ORM\Column(name="standard_name", type="string",  length=45, nullable=true, options={"comment"="材质名称"})
     */
    private $standard_name;
    
    /**
     * @var \DateTime
     *
     * @ORM\Column(name="created_at", type="datetime", options={"comment":"创建时间"})
     */
    private $createdAt;

}
